package com.by.autoconfig;

import org.springframework.boot.context.properties.ConfigurationProperties;

@ConfigurationProperties(prefix = "token")
public class TokenProperties {

    private final String DEFAULT_SECRET="lsdkfajlldfkjajldkflsdlk";
    private final int DEFAULT_TIME=30;

    /**
     * 密钥
     */
    String secret;

    /**
     * token有效时间 单位分钟
     */
    int times;

    public TokenProperties(){
        this.secret=DEFAULT_SECRET;
        this.times=DEFAULT_TIME;
    }

    public String getSecret() {
        return secret;
    }

    public void setSecret(String secret) {
        this.secret = secret;
    }

    public int getTimes() {
        return times;
    }

    public void setTimes(int times) {
        this.times = times;
    }
}
